﻿namespace WMS6.Web.Analytics
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class PurchasePlanRptQuery : BasePage
    {
        protected Button btnSearch;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlSku;
        protected DropDownList ddlSkuClassID;
        protected HtmlForm F15240;
        protected HtmlInputHidden hdnActionID;
        protected HtmlHead Head1;
        protected HtmlImage img1;
        protected HtmlImage img2;
        protected HtmlImage imgOwnerID;
        protected Label lblOwnerID;
        protected Label lblSku;
        protected Label lblSkuClassID;
        protected HtmlLink mycss;
        protected Label one1;
        protected TextBox txtOwnerID;
        protected TextBox txtSku;
        protected TextBox txtSkuClassID;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("PurchasePlanRptList.aspx", false);
        }

        private void InitDropDownLists()
        {
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlSku, 0);
            base.InitQueryDDL(this.ddlSkuClassID, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.InitDropDownLists();
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuClassID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuClassID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuClassID.Text.Trim(), this.ddlSkuClassID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSku.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSku.Text.Trim(), this.ddlSku.SelectedValue);
                }
                return "";
            }
        }
    }
}

